#ifndef UITOAST_H
#define UITOAST_H

#include <QWidget>

class UiToast : public QWidget
{
    Q_OBJECT
public:
    explicit UiToast(QWidget *parent = nullptr);
    ~UiToast(){};

public:
    void setText(const QString& text);

protected:
    void showEvent(QShowEvent* e) override;

private:
    void initUi();

private:
    class QHBoxLayout* m_mainLayout =nullptr;
    class QLabel* m_tipLabel = nullptr;
    const int m_spacing = 20;
    class QTimer* m_timer = nullptr;
};

#endif // UITOAST_H
